package myweb.myTcp;

import java.net.ServerSocket;
import java.net.Socket;

public class TcpServer2 {

    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(8001);
            while (true){
                Socket s= serverSocket.accept();
                System.out.println("coming a client");
                new Thread(new Worker(s)).start();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
